
<h1><?= $this->translate('#Module') ?></h1>
<?
    $currentType = 0;
    $currentTypeName = "";
    $pathStack = new \Yz_Array();
    $path = "";

    $var_tree->applyWithEnterExit(
        function($cat) use($pathStack, &$path) {
            $prefix = $cat->hasChildren() ? ' + ' : ' &middot; ';
            "" === $path and $path = $pathStack->join('/') . '/';
            $onclick = "";
            print <<<html
                    <b>{$prefix}</b>
                    <a href="/catalog/{$path}{$cat->name}">{$cat->title}</a><br/>\n
html;
        },
        // callback-enter
        function($cat) use($pathStack, &$path) {
            $pathStack->push($cat->name);
            $path = "";
            print <<<html
                <div id="dc-type-{$cat->id}" style="padding-left: 12px">\n
html;
        },
        // callback-exit
        function($cat) use($pathStack) {
            $pathStack->pop();
            print <<<html
                </div>\n
html;
        }
    ) ;

?>
<?= $this->renderTemplate($this->createTemplate('actionsMenu')) ?>